<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    div {
        height: 200px;
        width: 300px;
        background-color: blanchedalmond;
    }
    </style>
</head>
<body>
    <input type="button" value="点击按钮隐藏div" id="bn">
    <div id="d"></div>
    <script>
      function my$(id){
          return document.getElementById(id);
      }
      my$("bn").onclick = function (){
         var divStyleObjet =   my$("d").style;
         divStyleObjet.display = "none";
      }
    </script>
</body>
</html>